package com.hl.sfzy.mapper;

import com.hl.sfzy.entity.LogonUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 13430
 * @description 针对表【user(系统用户表，存储所有用户信息)】的数据库操作Mapper
 * @createDate 2024-09-05 17:52:24
 * @Entity com.hl.sfzy.entity.LogonUser
 */
@Mapper
@Repository
public interface LogonUserMapper {

//    int deleteByPrimaryKey(Long id);
//
//    int insert(LogonUser record);
//
//    int insertSelective(LogonUser record);
//
//    LogonUser selectByPrimaryKey(Long id);
//
//    int updateByPrimaryKey(LogonUser record);

    //根据username查询LogonUser
    LogonUser findLogonUserByUsername(String username);

    //根据phone查询LogonUser
    LogonUser findLogonUserByPhone(String phone);

    List<LogonUser> findLogonUserByPhone1(String phone);

    //动态sql添加LogonUser
    int insertDynamic(LogonUser logonUser);

    //根据phone动态修改LogonUser信息
    int updateByPhoneDynamic(@Param("phone") String phone, @Param("username") String username, @Param("password") String password);

    //根据id动态修改用户信息
    int updateByPrimaryKeySelective(@Param("id") String id, @Param("phone") String phone);
}
